import request from '@/utils/request.js'

export const shareListService = () => request.get(`/api/share/private/list`)

export const cancelShareService = shareIds =>
  request.post('/api/share/private/cancel', { shareIds })

export const createShareService = (shareName, shareType, shareDayType, shareFileIds) =>
  request.post('/api/share/private/create', { shareName, shareType, shareDayType, shareFileIds })

export const getShareService = identifier =>
  request.get(`/api/share/public/simple?identifier=${identifier}`)

export const checkShareCodeService = (identifier, shareCode) =>
  request.post(`/api/share/public/code/check`, { identifier, shareCode })
